package com.czk.springcloud.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 通用返回实体类
 *
 * @Author:ChenZhangKun
 * @Date: 2020/12/16 16:40
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    /**
     * 错误编码
     */
    private Integer code;
    private String message;
    private T data;

    /**
     * 构造方法
     *
     * @param code
     * @param message
     */
    public CommonResult(Integer code, String message) {
        this(code, message, null);
    }
}
